import { Layout, Menu } from 'antd';
import { UserOutlined } from '@ant-design/icons';
import Role from './Role/Role';
import User1 from './User/User1';
import { Link, Route, Redirect} from 'react-router-dom';
import Head from '../../components/header';
import './systemManege.css'


const { SubMenu } = Menu;
const { Sider } = Layout;

function SystemManege() {
    return <div className='SystemManegebox'>
            <Layout>
                {/* heard头部 */}
                <Head />
                <Layout>
                    <Sider width={200} className="site-layout-background">
                        <Menu
                            mode="inline"
                            theme="dark"
                            defaultSelectedKeys={['1']}
                            defaultOpenKeys={['sub1']}
                            style={{ height: '100%', borderRight: 0 }}
                        >
                            {/* 左侧导航栏 */}
                            <SubMenu key="sub1" icon={<UserOutlined />} title="系统管理">
                                <Menu.Item key="1">
                                    <Link to="/home/systemManege/User">企业详情</Link>
                                </Menu.Item>
                                <Menu.Item key="2"><Link to="/home/systemManege/Role">角色管理</Link></Menu.Item>
                            </SubMenu>
                        </Menu>
                    </Sider>

                    <Route path="/home/systemManege/User">
                        <User1/>
                    </Route>
                    <Route path="/home/systemManege/Role">
                        <Role />
                    </Route>
                    <Redirect to="/home/systemManege/User"></Redirect>
                    
                </Layout>
            </Layout>
    </div>
}
export default SystemManege;